NoteTokenFactory
NoteTokenFactory
TOKEN_INIT_FUNC_SELECTOR
bytes4 TOKEN_INIT_FUNC_SELECTOR
registry
contract Registry registry
tokens
contract INoteToken[] tokens
noteTokenImplementation
address noteTokenImplementation
isExistingTokens
mapping(address => bool) isExistingTokens
onlySecuritizationManager
modifier onlySecuritizationManager()
initialize
function initialize(contract Registry _registry, address _factoryAdmin) public
setFactoryAdmin
function setFactoryAdmin(address _factoryAdmin) public
Sets the address that can manage the factory contract.
Parameters
Name | Type | Description |
---|---|---|
_factoryAdmin | address | The new address for the factory admin. |
changeMinterRole
function changeMinterRole(address tokenAddress, address newController) external
Changes the minter role for a given token
Only callable by the securitization manager
Parameters
Name | Type | Description |
---|---|---|
tokenAddress | address | Address of the token to change the minter role for |
newController | address | New controller that will have the minter role |
setNoteTokenImplementation
function setNoteTokenImplementation(address newAddress) external
This function allows an admin to set a new implementation address for NoteToken.
Parameters
Name | Type | Description |
---|---|---|
newAddress | address | The new address of the NoteToken implementation. It cannot be zero. |
createToken
function createToken(address _poolAddress, enum Configuration.NOTE_TOKEN_TYPE _noteTokenType, uint8 _nDecimals, string ticker) external returns (address)
Creates a new note token instance.
Parameters
Name | Type | Description |
---|---|---|
_poolAddress | address | The address of the pool that will own this note token. |
_noteTokenType | enum Configuration.NOTE_TOKEN_TYPE | The type of the note token (Senior or Junior). |
_nDecimals | uint8 | The number of decimals for the note token's underlying asset. |
ticker | string | The ticker symbol for the note token. |
Return Values
Name | Type | Description |
---|---|---|
[0] | address | address Returns the address of the newly created note token instance. |
pauseUnpauseToken
function pauseUnpauseToken(address tokenAddress) external
This function allows an admin to pause or unpause any ERC20 token. If the token is currently paused, it will be unpaused; if not, it will be paused.
Parameters
Name | Type | Description |
---|---|---|
tokenAddress | address | The address of the ERC20 token that needs to be paused/unpaused. |
pauseAllTokens
function pauseAllTokens() external
Pauses all tokens that are not already paused.
This function can only be called by the default admin role and cannot be re-entered until it finishes execution.
It will loop through each token in the tokens
array, check if it is not paused, and if so, pause it.
unPauseAllTokens
function unPauseAllTokens() external
This function unpauses all paused ERC20 tokens in the contract. Only callable by admins.